<template>
    <div>
        <c-title text="招募商家"></c-title>
        <div class="recruit-merchant">
            <img :src="code" alt="">
            <div class="t-c tips">专属推广二维码，用于推广客户</div>
            <div class="t-c fz-14 main-color">已招募<span class="c-F15353">{{store_count}}个</span>，还可招募<span class="c-F15353">{{store_limit}}个</span>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            code: "",
            store_count: "",
            store_limit: "",
        };
    },
    activated() {
        this.getData()
    },

    methods: {
        getData() {
            $http.post('plugin.zhixianggou.api.merchant.get-merchant-code').then(res => {
                if (res.result) {
                    this.code = res.data.code;
                    this.store_count = res.data.store_count;
                    this.store_limit = res.data.store_limit;
                } else {
                    this.$toast(res.msg);
                }
            })
        }
    }
};
</script>

<style scoped lang='scss'>
/** **/
.recruit-merchant {
    margin: .625rem .75rem;
    background-color: #fff;
    border-radius: .5rem;
    padding-top: 2.5rem;
    padding-bottom: 2.0625rem;

    .c-F15353 {
        color: var(--themeBaseColor);
    }

    .main-color {
        color: #00001C;
    }

    .tips {
        font-weight: 400;
        font-size: .875rem;
        line-height: 1;
        margin-top: 1.125rem;
        margin-bottom: .7188rem;
        color: #999999;
    }

    img {
        margin: 0;
        width: 7.5rem;
    }

}
</style>